home *** CD-ROM | disk | FTP | other *** search
- Path: castle.nando.net!news
- From: actuary@nando.net@mailhost.nando.net (Bill McCarthy)
- Newsgroups: comp.lang.c
- Subject: Re: File problem with Watcom C/C++ 10.5
- Date: Sun, 07 Apr 1996 19:37:07 -0400
- Organization: Nando.net Public Access
- Distribution: world
- Message-ID: <jGFaxUKSAOTS089yn@mailhost.nando.net>
- References: <4k9fds$4fs@sparcserver.lrz-muenchen.de>
- NNTP-Posting-Host: grail613.nando.net
-
- In article <4k9fds$4fs@sparcserver.lrz-muenchen.de>,
- Ralph Reichart <reichart@informatik.tu-muenchen.de> wrote:
- >hi,
- >
- >i have a big problem. i'm trying to open a file with fopen. the program
- >looks like this:
- >
- >#include <stdlib.h>
- >#include <stdio.h>
- >
- >main()
- >{
- > FILE *Datei;
- >
- > Datei = fopen("\autoexec.bat", "r");
- > if (Datei == NULL)
- > {
- > printf("\nSHIT!!");
- > exit(1);
- > };
- > fclose(Datei);
- >}
- >
- >i'm sorry, but i can't open it. i always have the value -1 or 1 in errno.
- >yes, the file exists, but it doesn't matter. it never works.
- >can somebody please help me??
-
- Here's a big hint, ralphy: Ding Dong
-
- Your found the bell ('\a'). If you insist on using backslash
- characters, use two. Or use a single foreward slash.
-
- Bill McCarthy
- actuary@nando.net
- Wendell, NC USA
-